home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 9 / The PC-SIG Library on CD ROM - Ninth Edition.iso / 2301_400 / DISK2314 / DISK2314.ZIP / LE_C.ZIP / LE_C.H next >
C/C++ Source or Header  |  1990-10-26  |  8KB  |  297 lines

  1. #ifndef FKEY
  2.   struct fkey
  3.   {
  4.    unsigned F1: 1;
  5.    unsigned F2: 1;
  6.    unsigned F3: 1;
  7.    unsigned F4: 1;
  8.    unsigned F5: 1;
  9.    unsigned F6: 1;
  10.    unsigned F7: 1;
  11.    unsigned F8: 1;
  12.    unsigned F9: 1;
  13.    unsigned F10: 1;
  14.    unsigned F11: 1;
  15.    unsigned F12: 1;
  16.    unsigned PgDn: 1;
  17.    unsigned PgUp: 1;
  18.    unsigned UP: 1;
  19.    unsigned DOWN: 1;
  20.   };
  21.   #define FKEY
  22. #endif
  23.  
  24. #ifndef ITEM
  25.   struct item_struct
  26.   {
  27.     int row;        /* row position */
  28.     int col;        /* column position */
  29.     char width;     /* width of largest item */
  30.     char items;     /* number of items */
  31.     int pos;        /* current position in table */
  32.   };
  33.   #define ITEM
  34. #endif
  35.  
  36. #ifndef INPUT_STRUCT
  37.   struct le_input
  38.   {
  39.      char type;
  40.      char row;
  41.      char col;
  42.      int help;
  43.      double *dbl_val;
  44.      long *long_val;
  45.      char left_dig;
  46.      char right_dig;
  47.      char size;
  48.      char lines;
  49.      char *string;
  50.      char **item_table;
  51.      int item_pos;
  52.   };
  53.   #define INPUT_STRUCT
  54. #endif
  55.  
  56. #ifndef MENU_STRUCTS
  57.   struct BMENU_ITEMS
  58.   {
  59.     char *item;
  60.     char key;
  61.     int help;
  62.   };
  63.  
  64.   struct BMENU
  65.   {
  66.     char *title;
  67.     char row;
  68.     char col;
  69.     char pos;
  70.     char items;
  71.     char box_type;
  72.     char explode_sw;
  73.     int help;
  74.   };
  75.  
  76.   struct BOX_MENU
  77.   {
  78.     char *msg1;
  79.     char *msg2;
  80.     char *msg3;
  81.     char pos;
  82.     char row;
  83.     char col;
  84.     char items;
  85.     char explode_sw;
  86.     char help;
  87.   };
  88.   #define MENU_STRUCTS
  89. #endif
  90.  
  91.  
  92.  
  93.  
  94. #define ESC 27
  95. #define BELL "\a"
  96. #define SPACE ' '
  97. #define MINUS_SIGN '-'
  98. #define DEC_PT '.'
  99. #define TAB 9
  100. #define COMMA ','
  101. #define BACK_SPACE '\b'
  102. #define DEL_KEY    21248  /* delete key int value */
  103. #define CURS_RIGHT 19712  /* cursor right int value */
  104. #define CURS_LEFT  19200  /* cursor left int value */
  105. #define CURS_UP    18432  /* cursor up int value */
  106. #define CURS_DOWN  20480  /* cursor down int value */
  107. #define SPECIAL_FKEYS 40  /* number of user defined help keys */
  108.  
  109. /* box drawing characters */
  110. #define S_VLINE '│'
  111. #define S_HLINE '─'
  112. #define S_ULCOR '┌'
  113. #define S_URCOR '┐'
  114. #define S_LLCOR '└'
  115. #define S_LRCOR '┘'
  116.  
  117. #define D_VLINE '║'
  118. #define D_HLINE '═'
  119. #define D_ULCOR '╔'
  120. #define D_URCOR '╗'
  121. #define D_LLCOR '╚'
  122. #define D_LRCOR '╝'
  123.  
  124. #define SD_ULCOR '╒'
  125. #define SD_URCOR '╕'
  126. #define SD_LLCOR '╘'
  127. #define SD_LRCOR '╛'
  128.  
  129. #define DS_ULCOR '╓'
  130. #define DS_URCOR '╖'
  131. #define DS_LLCOR '╙'
  132. #define DS_LRCOR '╜'
  133.  
  134. #define S_LEND '├'
  135. #define S_REND '┤'
  136. #define D_LEND '╠'
  137. #define D_REND '╣'
  138.  
  139. #define S_TEND '┬'
  140. #define S_BEND '┴'
  141. #define D_TEND '╦'
  142. #define D_BEND '╩'
  143.  
  144. /* le_size_cursor manifest constants */
  145. #define CURSOR_OFF 0
  146. #define CURSOR_ON  1
  147. #define CURSOR_INSERT 2
  148.  
  149. /* le_draw_border(), le_draw_hline(), & le_draw_vline() manifest constants */
  150. #define SINGLE_LINE 1
  151. #define DOUBLE_LINE 2
  152. #define SVER_DHOR 3     /* box: single verticle - double horizontal */
  153. #define DVER_SHOR 4     /* box: double verticle - single horizontal */
  154. #define SINGLE_ENDS 3   /* line: single ver/hor line with ends */
  155. #define DOUBLE_ENDS 4   /* line: double ver/hor line with ends */
  156.  
  157. /* exploding box constants */
  158. #define EXPLODE_ON  1
  159. #define EXPLODE_OFF 0
  160.  
  161. /* le_inpt() manifest constants */
  162. #define GET_DOUBLE 0
  163. #define GET_LONG   1
  164. #define GET_DATE   2
  165. #define GET_ITEM   3
  166. #define GET_MULTLN 4
  167. #define GET_STRING 5
  168.  
  169. /* le_restore_block() manifest constants */
  170. #define RESTORE_ONLY 1
  171. #define FREE_ONLY    2
  172. #define RESTORE_FREE 3
  173.  
  174. /* external variables from le_menu.c */
  175. extern char _le_bmenu_bar_clr;
  176. extern char _le_bmenu_clr;
  177. extern char _le_bmenu_act_clr;
  178. extern char _le_bmenu_norm_act_clr;
  179. extern char _le_bmenu_shadow;
  180. extern char _le_bmenu_hot_sw;
  181. extern char _le_bmenu_width;
  182. extern char _le_bmenu_rows;
  183.  
  184. /* external variables from le_inpt.c */
  185. extern char _le_clr_in;                 /* input color */
  186. extern char _le_clr_out;                /* output color */
  187. extern int _le_toggle_key1;             /* input toggle #1 */
  188. extern int _le_toggle_key2;             /* input toggle #2 */
  189. extern int _le_skey[];                  /* special input function keys */
  190.  
  191. /* external variables from le_util.c */
  192. extern long _le_tenth;             /* fudge factor for exploding box */
  193.  
  194. /* external variables from le_help.c */
  195. #define LE_HELP_PAGES 200
  196. extern long _le_help_page[LE_HELP_PAGES]; /* help page */
  197. extern char _le_help_load_sw;           /* help facility load switch */
  198. extern char _le_help_file[];            /* help file name */
  199. extern char _le_help_row;               /* help window screen row */
  200. extern char _le_help_col;               /* help window screen column */
  201. extern char _le_help_width;             /* help window width */
  202. extern char _le_help_move_sw;           /* help window move switch */
  203. extern char _le_help_reset_clr;         /* screen reset color */
  204. extern char _le_help_clr;               /* help screen color */
  205. extern char _le_help_explode_sw;        /* help facility explode switch */
  206. extern char _le_help_box_type;          /* help window box type */
  207.  
  208. /* external variables from le_vid.c */
  209. extern char far *le_video_mem;  /* far pointer to video memory */
  210.  
  211. /* external variables from le_inpt.c */
  212. extern char _le_toggle_sw;    /* toggle field switch */
  213. extern int le_skey;      /* special function key switch */
  214.  
  215. /* le_vid.c prototypes */
  216. int le_video_mode(void);
  217. void le_set_video_mem(void);
  218.  
  219. /* le_misc.c prototypes */
  220. void le_goto_xy(char, char);
  221. int le_size_cursor(int);
  222. int le_scroll_up(char, char, char, char, char, char);
  223. int le_scroll_down(char, char, char, char, char, char);
  224.  
  225. /* le_write.c prototypes */
  226. int le_clear_block(char, char, char, char, char);
  227. int le_draw_border (char, char, char, char, char, char, char);
  228. int le_write_char(char, char, char, char);
  229. int le_write_string (char, char , char *, char);
  230. int le_draw_hline (char, char, char, char, char);
  231. int le_draw_vline (char, char, char, char, char);
  232. int le_rewrite_scrn(char, char, char, char, char);
  233. int le_write_far_string (char, char, char far *, char);
  234. int le_fill_block(char, char, char, char, char, char);
  235. int le_cls(char attrib);
  236.  
  237. /* le_save.c prototypes */
  238. int le_build_buffers(int);
  239. int le_restore_scrn(int);
  240. int le_save_scrn(int);
  241. int le_save_block(char, char, char, char, char);
  242. int le_restore_block(char, char, char, char, char, char);
  243.  
  244. /* le_dbl.c prototypes */
  245. int le_round_double(double *, int);
  246. int le_get_double(double *, char, char, char, char, struct fkey, int);
  247. int le_init_double_str(char *, char, char);
  248. int le_format_double(double *, char[], int, int, char);
  249.  
  250. /* le_long.c prototypes */
  251. int le_get_long(long *, char, char, char, struct fkey, int);
  252. int le_format_long(long, char[], int, char);
  253.  
  254. /* le_date.c prototypes */
  255. int le_get_date(char *, char, char, struct fkey, int);
  256.  
  257. /* le_key.c prototypes */
  258. int le_get_key(void);
  259.  
  260. /* le_strng.c prototypes */
  261. int le_get_multln(char *, int, int, int, int, struct fkey, int);
  262. int le_get_string(char *, int, int, int, struct fkey, int);
  263.  
  264. /* le_inpt.c prototypes */
  265. int le_input(struct le_input[], int, int *, struct fkey);
  266.  
  267. /* le_item.c prototypes */
  268. int le_item_switch(struct item_struct *, char *[], struct fkey, int);
  269.  
  270. /* le_init.c prototypes */
  271. void le_init_field(char *, char, int);
  272.  
  273. /* le_skey.c prototypes */
  274. int le_special_key(int key_in);
  275.  
  276. /* le_util.c function prototypes */
  277. void le_fudge_factor(void);
  278. void le_wait(int);
  279. int le_locate_file(char *, char *);
  280. void le_fright_zero(char [], int, char, char, char);
  281. int le_verify_date(char[], long *);
  282. void le_long_to_date(long, char *);
  283. void le_system_date(long *);
  284. void le_init_fkey_struct(struct fkey *);
  285. int le_word_wrap(char *, int, char, char, char);
  286. int le_display_error(char *, char, char, char, char, char);
  287. void le_severe_error(char *, char);
  288. int le_is_dos_legal(char test_file[]);
  289.  
  290. /* le_menu.c prototypes */
  291. int le_bmenu(struct BMENU *, struct BMENU_ITEMS [], struct fkey);
  292. int le_box_menu(struct BOX_MENU *, struct BMENU_ITEMS [], struct fkey);
  293.  
  294. /* le_help.c function prototypes */
  295. void le_read_help(void);
  296. int le_help(int);
  297.